package com.balakitbbs.service;

import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.stereotype.Service;                 
import com.balakitbbs.page.SearchPageUtil;     
import java.util.*;     
import com.balakitbbs.entity.Bala_mainpost;
import com.balakitbbs.dao.Bala_mainpostDaoIF;
   /**
    * bala_mainpost Service类
    */ 
@Service
public class Bala_mainpostService{
@Autowired
private Bala_mainpostDaoIF dao;
	public void addBala_mainpost(Bala_mainpost bala_mainpost){
		dao.addBala_mainpost(bala_mainpost);
	}

	public void delBala_mainpost(String id){
		dao.delBala_mainpost(id);
	}

	public void delBala_mainpostTrue(String id){
		dao.delBala_mainpostTrue(id);
	}

	public void updateBala_mainpost(Bala_mainpost bala_mainpost){
		dao.updateBala_mainpost(bala_mainpost);
	}

	public Bala_mainpost selectBala_mainpostById(String id){
		return dao.selectBala_mainpostByID(id);
	}

	public int selectBala_mainpostCount(){
		return dao.selectBala_mainpostCount();
	}

	public int selectBala_mainpostCountAll(){
		return dao.selectBala_mainpostCountAll();
	}

	public List<Bala_mainpost> selectBala_mainpostsByPage(SearchPageUtil spu){
		return dao.selectBala_mainpostsByPage(spu);
	}

	public int selectBala_mainpostsByPOJOCount(Bala_mainpost bala_mainpost){
		return dao.selectBala_mainpostsByPOJOCount(bala_mainpost);
	}

	public List<Bala_mainpost> selectBala_mainpostsByPOJO(Bala_mainpost bala_mainpost){
		return dao.selectBala_mainpostsByPOJO(bala_mainpost);
	}

	public List<Bala_mainpost> selectBala_mainpostsByPojoPage(SearchPageUtil spu,Bala_mainpost bala_mainpost){
		Map map = new HashMap();
		map.put("spu",spu);
		map.put("pojo",bala_mainpost);
		return dao.selectBala_mainpostsByPojoPage(map);
	}

}

